<template>
  <div>

    <el-row :gutter="20">

      <el-col :span="2" class="side-col">
        <float-icon>???</float-icon>
      </el-col>

      <el-col :span="17" class="left-col">
        <main-article></main-article>
        <comment></comment>
      </el-col>

      <el-col :span="7">
        <right></right>
      </el-col>
    </el-row>

  </div>
</template>

<script>
  import CommentArea from "./parts/left/CommentArea";
  import RecommendArticle from "./parts/right/RecommendArticle";
  import MainArticle from "./parts/left/MainArticle";
  import RecommendFloatIcon from "./parts/left/FloatIcon";

  export default {
    name: "Posts",
    data() {
      return {
        user: {
          avatar: 'https://murasakichigo.xyz/my-jianshu-simu/assets/img/avatars/7bfdd41d-7cc5-4bc0-a922-2e0180391320.png',
          text: '',
        },

      }
    },
    components: {
      'main-article': MainArticle,
      'comment': CommentArea,
      'right': RecommendArticle,
      'float-icon': RecommendFloatIcon
    },
    methods: {
      getLastUri() {
        let uri = this.$route.path.split("/");
        return uri[uri.length - 1];
      },
    },
    mounted() {
      alert('即将跳转至:'+this.getLastUri());

    }
  }
</script>

<style scoped lang="less">

  .side-col {
    position: fixed;
    margin-top: 150px;
    margin-left: -100px;
  }

  .el-card{
    margin-top: 20px;
  }






</style>